package com.fy.market.strategy.model.entity;

import com.fy.market.strategy.model.enums.RuleLogicCheckTypeEnum;
import com.fy.market.strategy.model.enums.RuleModelEnum;
import lombok.*;

/**
 * @author fwq
 * @desc 规则动作实体
 * @date 2025-09-26
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity> {
    private T data;
    private RuleModelEnum ruleModelEnum;
    private RuleLogicCheckTypeEnum ruleLogicCheckTypeEnum;
    static public class RaffleEntity {

    }

    // 抽奖之前
    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static public class RaffleBeforeEntity extends RaffleEntity {
        /**
         * 策略ID
         */
        private Integer strategyId;

        /**
         * 权重值Key；用于抽奖时可以选择权重抽奖。
         */
        private Integer ruleWeightValueKey;

        /**
         * 奖品ID；
         */
        private Integer awardId;
    }

    // 抽奖之后
    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static public class RaffleAfterEntity extends RaffleEntity {
        /**
         * 策略ID
         */
        private Integer strategyId;
        /**
         * 奖品ID；中置过滤结果的奖品id
         */
        private Integer awardId;
    }

}
